{extend name='template/base'}{/extend}
{block name='style'}{/block}
{block name='script'}{/block}
{block name='content'}
<div class="wrapper">
        <form class="form-horizontal" id="form">
            <div class=" nav-tabs-custom">
                <div class="tab-content">
                    <div class="tab-pane active" id="tab_1">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">订单编号</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {$data.order_sn}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">礼品名称</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {$data.goods_name}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">会员名称</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {$data.account_name}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">订单时间</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                   {:date('Y-m-d H:i:s',$data.order_time)}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">支付状态</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {if $data.flag_pay eq 1}已确认支付{else}未支付{/if}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">支付时间</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                {:date('Y-m-d H:i:s',$data.pay_time)}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">礼品领取</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {if $data.flag_gift eq 1}已领取{else}未领取{/if}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">礼品领取码</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {$data.gift_code}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">礼品领取时间</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {:date('Y-m-d H:i:s',$data.take_gift_time)}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">礼品领取备注</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {$data.gift_remark}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">优惠券领取</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {if $data.flag_get_coupon eq 1}已领取{else}未领取{/if}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">优惠券领取备注</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {$data.coupon_remark}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">VIP抵扣券领取</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {if $data.flag_get_coupon eq 0}未领取{/if}
                                    {if $data.flag_get_coupon eq 1}已领取{/if}
                                    {if $data.flag_get_coupon eq 2}已使用{/if}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">VIP抵扣券金额</label>
                                <div class="col-sm-4" style="padding-top: 7px;">
                                    {$data.vip_coupon_deduction} 元
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否领取商城优惠券</label>
                                <div class="col-sm-8" style="padding-top: 7px;">
                                    {if $data.flag_shop_coupon eq 0}否{/if}
                                    {if $data.flag_shop_coupon eq 1}是{/if}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </form>
</div>
{/block}
{block name='script_extra'}

<script>
    $("#form").Validform({
        tiptype:2,
        showAllError:true,
        ajaxPost: true,
        callback: function (res) {
            console.log(1111);
            if (res.success == true){

                layer.msg(res.message, {time: 1000},function () {
                    layer_close();
                    parent.$('#table').bootstrapTable('refresh');
                });
            }else{
                layer.alert(res.message);
            }
        }
    });
</script>
{/block}